﻿using NewsCollection.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace NewsCollection.Common.UpdateGUI
{
    class UpdateCombobox
    {
        DataContext db = new DataContext("name=news");
        public void UpdateListCategory(ComboBox cbb)
        {
            var list = db.CategoryManual.ToList();
            cbb.DataSource = list;
            cbb.DisplayMember = "MyName";
            cbb.ValueMember = "Id";
        }
    }
}
